home *** CD-ROM | disk | FTP | other *** search
- global gDataStart, gDataStop, gDataFile, FileIO, gStoredTime, gAutomated, gWhichAutomatedClip, gLoadedTimeCodes
-
- on initTracking
- set gDataStart to the long time
- if char 2 of gDataStart = ":" then
- set gDataStart to "0" & gDataStart
- end if
- set gDataStart to (value(char 1 to 2 of gDataStart) * 60 * 60) + (value(char 4 to 5 of gDataStart) * 60) + value(char 7 to 8 of gDataStart)
- end
-
- on exitTracking
- writeData(RETURN & the long time & " Exited.")
- set gDataStop to the long time
- if char 2 of gDataStop = ":" then
- set gDataStop to "0" & gDataStop
- end if
- set gDataStop to (value(char 1 to 2 of gDataStop) * 60 * 60) + (value(char 4 to 5 of gDataStop) * 60) + value(char 7 to 8 of gDataStop)
- set elapsedTime to gDataStop - gDataStart
- set hours to "00" & string(elapsedTime / 60 / 60)
- set minutes to "00" & string(elapsedTime / 60 mod 60)
- set seconds to "00" & string(elapsedTime mod 60)
- set hours to chars(hours, the number of chars in hours - 1, the number of chars in hours)
- set minutes to chars(minutes, the number of chars in minutes - 1, the number of chars in minutes)
- set seconds to chars(seconds, the number of chars in seconds - 1, the number of chars in seconds)
- writeData(hours & ":" & minutes & ":" & seconds & " Total elapsed time." & RETURN & RETURN & RETURN)
- writeDataFile()
- end
-
- on readDataFile
- if the machineType = 256 then
- openXLib("FileIO.DLL")
- set gDataFile to FileIO(mnew, "?read", "TXT")
- else
- set gDataFile to FileIO(mnew, "?read", "TEXT")
- end if
- if objectp(gDataFile) = 0 then
- errorMessage()
- go(the frame)
- else
- set adjustedTimeCodes to gDataFile(mReadFile)
- do("set adjustedTimeCodes=" & line 3 of adjustedTimeCodes)
- if developersKey() then
- put adjustedTimeCodes
- end if
- if checkTimeCodes(adjustedTimeCodes) = 0 then
- readDataFile()
- exit
- else
- set gAutomated to 1
- set gLoadedTimeCodes to adjustedTimeCodes
- set gRecording to 0
- set the timeoutScript to "nothing"
- set gWhichAutomatedClip to 1
- correlateSliderPositionsToMovieTime()
- set gStoredTime to []
- set gAutomatedTimes to []
- set gWhichAutomatedClip to 1
- advanceAutomatedMovie()
- end if
- end if
- end
-
- on writeData theData
- set gDataFile to gDataFile & theData & RETURN
- end
-
- on writeDataFile whichData
- if the machineType = 256 then
- openXLib("FileIO.DLL")
- end if
- set gDataFile to FileIO(mnew, "?write", EMPTY)
- if objectp(gDataFile) = 0 then
- errorMessage()
- else
- gDataFile(mWriteString, "Digital Playground FantaSave (TM) data for Virtual Sex Shoot." & RETURN & RETURN)
- if voidp(whichData) then
- set whichData to gStoredTime
- end if
- gDataFile(mWriteString, string(whichData & RETURN))
- if objectp(gDataFile) <> 0 then
- gDataFile(mdispose)
- end if
- end if
- end
-
- on errorMessage
- if gDataFile = -43 then
- nothing()
- else
- if (gDataFile = -33) or (gDataFile = -34) then
- alert("This volume is full.")
- else
- alert("File I/O object was not made." & RETURN & "Error: " & string(gDataFile))
- if not (the shiftDown) then
- beep(2)
- end if
- end if
- end if
- end
-
- on stringEntry
- writeData(EMPTY)
- end
-